(DEFUN chkkwds (kwd /)
  (SETQ invalidcharlst (LIST "_" "!" "@" "$" "%" "^" "`" "(" ")" "*" "=" "<" ">"));"&" "+" 
  (IF (OR (WCMATCH kwd "*_*")
          (WCMATCH kwd "*`!*")
          (WCMATCH kwd "*`@*")
          (WCMATCH kwd "*`$*")
          (WCMATCH kwd "*`%*")
          (WCMATCH kwd "*`^*")
;          (WCMATCH kwd "*`&*")
          (WCMATCH kwd "*`**")
          (WCMATCH kwd "*(*")
          (WCMATCH kwd "*)*")
;          (WCMATCH kwd "*+*")
          (WCMATCH kwd "*=*")
          (WCMATCH kwd "*<*")
          (WCMATCH kwd "*>*")
      ) ;_ end of OR
    (PROGN
           (ALERT (STRCAT "Keyword string: " kwd))
           (PRINC "\nInvalid characters in keyword specification!")
           (PRINC "\nAttempting to disable invalid keywords.")
           (PRINC)
           (SETQ stripkwd kwd
                 kwdcnt 1
                 charposlst NIL
           ) ;_ end of setq
           (WHILE (AND stripkwd (<= kwdcnt (STRLEN kwd)))
             (IF (MEMBER (SUBSTR stripkwd kwdcnt 1) invalidcharlst)
               (IF charposlst
                 (SETQ charposlst (APPEND charposlst (LIST kwdcnt)))
                 (SETQ charposlst (LIST kwdcnt))
               ) ;_ end of if
             ) ;_ end of if
             (SETQ kwdcnt (1+ kwdcnt))
           ) ;_ end of while
           (FOREACH n charposlst
             (COND ((OR (WCMATCH (SUBSTR kwd 1 n) "* *") (WCMATCH (SUBSTR kwd n) "* *"))
                    (SETQ inicnt n)
                    (WHILE (/= (SUBSTR kwd (1- inicnt) 1) " ") (SETQ inicnt (1- inicnt)))
                    (SETQ endcnt inicnt)
                    (WHILE (AND (/= endcnt (1- (STRLEN kwd))) (/= (SUBSTR kwd (1+ endcnt) 1) " "))
                      (SETQ endcnt (1+ endcnt))
                    ) ;_ end of WHILE
                    (SETQ remcnt inicnt
                          remend endcnt
                    ) ;_ end of SETQ
                    (WHILE (<= inicnt endcnt)
                      (SETQ kwd (STRCAT (SUBSTR kwd 1 (1- inicnt)) " " (SUBSTR kwd (1+ inicnt))))
                      (SETQ inicnt (1+ inicnt))
                    ) ;_ end of WHILE
                    (PRINC (STRCAT "\nKeyword " (SUBSTR stripkwd remcnt (- endcnt remcnt -1)) " is disabled! "))
                    (PRINC)
                   )
             ) ;_ end of COND
           ) ;_ end of FOREACH
           (PRINC "\nOmit invalid keyword characters at source to enable these keywords. ")
           (PRINC)
    ) ;_ end of PROGN
  ) ;_ end of IF
) ;_ end of DEFUN